
<!DOCTYPE html>
<html>
<head>
    <#import "spring.ftl" as spring />
    <meta charset="utf-8" />
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1" />
    <!-- 登录设置-title -->
    <title><@spring.message code="title"/></title>
    <link rel="icon" href='<@spring.message code="logo_favicon"/>' />
    <link rel="stylesheet" href="${request.contextPath}/css/base.css" />
    <link rel="stylesheet" href="${request.contextPath}/css/login.css"  />
    <script type="text/javascript" src="${request.contextPath}/js/jquery.min.js"></script>
    <!--[if lt IE 9]>
    <script src="${request.contextPath}/js/html5shiv.min.js"></script>
    <script src="${request.contextPath}/js/respond.min.js"></script>
<![endif]-->
</head>

<body>
<div class="loginDiv">
    <div class="divBg"></div>
	<canvas id="canvas" class="canvas" width="495" height="900"></canvas>
    <div class="header">
        <div class="wtn">
            <a href="${request.contextPath}" class="logo"></a>
        </div>
    </div>
    <div class="loginCont">
        <input type="hidden" id="noticeFlag" value="${noticeFlag?c}" />
        <#if noticeFlag>
            <div class="scrollBox" style="">
                <div class="scrollCont" id="colee" >
                    <div class="scrollDiv" id="colee1">
                        <p>${noticeContent}</p>
                    </div>
                    <div class="scrollFont" id="colee2"></div>
                </div>
            </div>
        </#if>
        <div class='<@spring.message code="class"/>'>
        	<div>
                <h3><@spring.message code="h3"/></h3>
                <p><@spring.message code="p"/></p>
            </div>
        </div>
        <div class="loginBox pos" >
        	<form action="${request.contextPath}/doLogin" method="post">
            <span class="wxBox">
                <span class="wxDiv"><img src="images/zhifubao.png" /><font><@spring.message code="app" /></font></span>
                <span class="wxDiv"><img src="images/weixin.png" /><font><@spring.message code="wx" /></font></span>
            </span>
            <#if product??>
            	<#assign productName=product.name />
	            <span class="cpLogo"><span class="${productName}<@spring.message code='logo_login'/>" >单点登录系统</span></span>
            </#if>
            <input type="hidden" id="languageFlag" value="${languageFlag?c}" />
            <#if languageFlag>
                <#if redirect_url??>
                    <#assign redirectUrl="redirect_url="+redirect_url />
                    <a class="switch" href='${request.contextPath}/login?${redirectUrl}&locale=<@spring.message code="exchange"/>' > <@spring.message code="language"/> </a>
                <#else>
                    <a class="switch" href='${request.contextPath}/login?locale=<@spring.message code="exchange"/>' > <@spring.message code="language"/> </a>
                </#if>
            </#if>
            <!-- todo -->
            <p class="tipBox pos">
                <label class="passbox error">
         	       <#if ERRORCODE??>
        		      <#if ERRORCODE=="USERNAME"> 
          			 	    <@spring.message code="login.username.required"/>
           			  <#elseif ERRORCODE=="PASSWORD"> 
          			 	     <@spring.message code="login.password.required"/>
           			  <#elseif ERRORCODE=="USERNAME_PASSWORD"> 
          			         <@spring.message code="login.auth"/>
            		  <#elseif ERRORCODE=="VALID_CODE"> 
          			         <@spring.message code="login.code.invalid"/>
           			  <#elseif ERRORCODE=="VALID_CODE_ERROR"> 
            			     <@spring.message code="login.code.error"/>
            		  <#else> 
            		  </#if>     
            	  </#if>
                </label>
            </p>
            <div class="loginStep" onkeydown="enterKeyDown()">
                <div class="loginIn">
                    <span class="icoBg"><span class="loginUser"></span></span>
                    <input type="text" id="username" name="username" placeholder='<@spring.message code="login.username.placeholder"/>' />
                </div> 
                <div class="loginIn">
                    <span class="icoBg"><span class="loginPaw"></span></span>
                    <input type="password" id="password" name="password" placeholder='<@spring.message code="login.password.placeholder"/>' />
                </div>
                <div class="loginIn">
                    <span class="icoBg"><span class="loginYzm"></span></span>
                    <input type="text" id="validCode" name="validCode" placeholder='<@spring.message code="login.code.enter"/>' class="inputWid fl" />
                    <span class="yzmImg"><img class="inputButton" id="picCode" onclick="refresh()" alt="验证码" src="getValidCodeImage" /></span>
                </div>
                <div class="btnBox btnBoxPad">
                    <input type="button" class="loginBtn" onclick="doLogin()" value='<@spring.message code="login.btn.title"/>' />
                </div>
                <input type="hidden" name="redirect_url" value="${redirect_url!''}" />
                <div class="lastBox">
                    <#if casUrl??>
                        <a href="${request.contextPath}/reuser?service=${redirect_url!''}" class="commonHref mf10"><@spring.message code="noaccount"/></a>
                        <a href="${request.contextPath}/repwd?service=${redirect_url!''}" class="commonHref mf10"><@spring.message code="forgetpwd"/></a>
                    </#if>
                </div>
            </div>
            </form>
        </div>
    </div>
    
    <div class="foot">
        <p class="fPhone"><@spring.message code="phone"/></p>
        <#if copyright??>
            <p>${copyright}</p>
        </#if>
    </div>
</div>
<script type="text/javascript" src="${request.contextPath}/js/md5.min.js"></script>
<script type="text/javascript" src="${request.contextPath}/js/login.js"></script>
<script type="text/javascript" src="${request.contextPath}/js/canvas.js"></script>
<script type="text/javascript" src="${request.contextPath}/js/encrypt/crypto.custom.js"></script>
<script type="text/javascript" src="${request.contextPath}/js/encrypt/encryptUtil.js"></script>
</body>
</html>
